]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
screenshot: fix off-by-one selection size
authorClément Guérin <geecko.dev@free.fr>
Sat, 14 Mar 2015 22:48:41 +0000 (23:48 +0100)
committerJasper St. Pierre <jstpierre@mecheye.net>
Sat, 14 Mar 2015 23:04:23 +0000 (16:04 -0700)
Selecting the whole screen made a (scr_w-1,scr_h-1) sized screenshot.

https://bugzilla.gnome.org/show_bug.cgi?id=746223

js/ui/screenshot.js

index 50c5f9d07634519e5d54f8b8d0547278ece2c4f8..3a095b1b802dfe3e02d38b34c097d6191f35953a 100644 (file)
@@ -283,8 +283,8 @@ const SelectArea = new Lang.Class({
     _getGeometry: function() {
         return { x: Math.min(this._startX, this._lastX),
                  y: Math.min(this._startY, this._lastY),
-                 width: Math.abs(this._startX - this._lastX),
-                 height: Math.abs(this._startY - this._lastY) };
+                 width: Math.abs(this._startX - this._lastX) + 1,
+                 height: Math.abs(this._startY - this._lastY) + 1 };
     },
 
     _onMotionEvent: function(actor, event) {